home *** CD-ROM | disk | FTP | other *** search
-
-
-
- aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss((((3333ddddmmmm)))) aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss((((3333ddddmmmm))))
-
-
-
- NNNNAAAAMMMMEEEE
- afWriteFrames - write audio sample frames to a specified track in an
- audio file
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>>
-
- iiiinnnntttt aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss((((ccccoooonnnnsssstttt AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt ttttrrrraaaacccckkkk,,,,
- vvvvooooiiiidddd ****ssssaaaammmmpppplllleeeessss,,,, ccccoooonnnnsssstttt iiiinnnntttt ccccoooouuuunnnntttt))))
-
- PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
- _f_i_l_e expects the AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure for the audio file to which
- audio sample data will be written. This structure is usually
- the returned value of a call to aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm).
-
- _t_r_a_c_k is an integer which identifies the audio track (chunk) in the
- file to be accessed. Since all currently supported file
- formats allow at most one audio track per file, the value
- AAAAFFFF____DDDDEEEEFFFFAAAAUUUULLLLTTTT____TTTTRRRRAAAACCCCKKKK should always be used for this argument for
- now.
-
- _s_a_m_p_l_e_s is a pointer to a buffer containing samples to be written to
- the audio file.
-
- _c_o_u_n_t expects the number of sample _f_r_a_m_e_s you want to write to the
- audio track. For a stereo track, a sample frame would consist
- of a <left, right> sample pair. For a monaural track, a sample
- frame would be a single sample.
-
- RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
- aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss(((()))) returns the number of sample frames written to the
- internal track. The return value normally is greater than or equal to 0.
- In the event of an error, aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss(((()))) will return -1, and the error
- value can be retrieved via oooosssseeeerrrrrrrroooorrrr(3C).
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss(((()))) writes data to the specified track of an audio file from
- the _s_a_m_p_l_e_s buffer.
-
- aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss(((()))) attempts to write _c_o_u_n_t sample frames from the _s_a_m_p_l_e_s
- buffer to the track, starting at the current location of the file write
- pointer within the track. _s_a_m_p_l_e_s should be of type ssssiiiiggggnnnneeeedddd cccchhhhaaaarrrr****,
- uuuunnnnssssiiiiggggnnnneeeedddd cccchhhhaaaarrrr****, sssshhhhoooorrrrtttt****, iiiinnnntttt****, uuuunnnnssssiiiiggggnnnneeeedddd iiiinnnntttt****, ffffllllooooaaaatttt****, or ddddoooouuuubbbblllleeee**** depending
- on the width and format of the samples in the audio track as set using
- aaaaffffIIIInnnniiiittttSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt(3dm).
-
- When an audio file is opened with write access by aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm) or
- aaaaffffOOOOppppeeeennnnFFFFDDDD(3dm), the logical write pointer for the audio data is
- initialized to point to the location of the first sample frame in the
- track.
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss((((3333ddddmmmm)))) aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss((((3333ddddmmmm))))
-
-
-
- Before returning, aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss(((()))) automatically updates the logical write
- pointer for _t_r_a_c_k so that it points to the location of the sample frame
- following the last one written to the file.
-
- The _s_a_m_p_l_e_s buffer is interpreted differently depending on the current
- configuration of the audio track. In particular, the sampwidth parameter
- may or may not be meaningful, depending on what the sampfmt parameter is.
- See aaaaffffGGGGeeeettttSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt(3dm) for a full explanation of sample
- representations.
-
- aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss(((()))) automatically compresses data for audio tracks which are
- encoded using the CCITT G.722, CCITT G.711, MPEG, and Aware
- MultiRate/Lossless algorithms. The data is passed to aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss(((())))
- from an application program in the standard two's complement linear PCM
- format, but this is by no means guaranteed for later compression types
- (see aaaaffffGGGGeeeettttCCCCoooommmmpppprrrreeeessssssssiiiioooonnnn(3dm) for more information about this). You select
- a compression scheme for an audio track by calling
- aaaaffffIIIInnnniiiittttCCCCoooommmmpppprrrreeeessssssssiiiioooonnnn(3dm). To achieve real-time G.722 compression, the
- application process may require non-degrading scheduling priority (see
- sssscccchhhheeeeddddccccttttllll(2) or nnnnpppprrrriiii(1))
-
- If an audio track contains data for more than a single audio channel, the
- data placed in the _s_a_m_p_l_e_s buffer should be interleaved. Sample data to
- be written to a stereo file should be buffered as a sequence of
- left/right pairs (sample "frames"). Interleave conventions for files
- containing multichannel audio data are described in the AIFF-C
- specification.
-
- EEEEXXXXAAAAMMMMPPPPLLLLEEEE
- Example: to write 10000 stereo 16-bit sample pairs to a stereo AIFF-C
- file, place 20000 individual samples (i.e., 10000 <left, right> sample
- pairs) into a sssshhhhoooorrrrtttt[[[[]]]] buffer, and pass the buffer to aaaaffffWWWWrrrriiiitttteeeeFFFFrrrraaaammmmeeeessss(((()))) with
- _c_o_u_n_t set to 10000.
-
- CCCCAAAAVVVVEEEEAAAATTTTSSSS
- This routine will not function correctly if the user changes the file
- position on the file descriptor for the AFfilehandle being manipulated.
- See the section _C_A_V_E_A_T_S _F_O_R _U_S_I_N_G _T_H_E _H_A_N_D_L_E'_S _F_I_L_E _D_E_S_C_R_I_P_T_O_R in
- aaaaffffIIIInnnnttttrrrroooo(3dm) for some important information about how to deal with this
- situation.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- afOpenFile(3dm), afSeekFrame(3dm), afInitSampleFormat(3dm)
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-